package cn.s1995.sloth.bizs.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;
import cn.s1995.sloth.bizs.entity.base.BaseEntity;
import cn.s1995.sloth.common.core.convert.JoinUrlPrefixConvert;

import java.time.LocalDateTime;

/**
 * 视频评论
 *
 * @author Sasshi
 * @date 2023-12-13 10:30:37
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "视频评论")
@TableName("biz_video_comment")
public class VideoComment extends BaseEntity {


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "ID")
    private Long id;

	/**
	* 视频id
	*/
    @Schema(description = "视频id")
    private Long videoId;

	/**
	* 父id
	*/
    @Schema(description = "父id")
    private Long pid;

	/**
	* 被评论id
	*/
    @Schema(description = "被评论id")
    private Long toId;


	/**
	* 被评论的user_id
	*/
    @Schema(description = "被评论的user_id")
    private Long toUserId;

	/**
	* 状态：0.待审核 1.通过 2.拒绝
	*/
    @Schema(description = "状态：0.待审核 1.通过 2.拒绝")
    private Integer state;

	/**
	* 用户id
	*/
    @Schema(description = "用户id")
    private Long uid;

	/**
	* 评论内容
	*/
    @Schema(description = "评论内容")
    private String content;

	/**
	* 图片
	*/
    @JsonSerialize(using = JoinUrlPrefixConvert.class)
    @Schema(description = "图片")
    private String pic;

	/**
	* 点赞数
	*/
    @Schema(description = "点赞数")
    private Integer likeCount;

	/**
	* 是否匿名
	*/
    @Schema(description = "是否匿名")
    private Boolean isAnonymous;

	/**
	* IP
	*/
    @Schema(description = "IP")
    private String ip;

	/**
	* 删除标识
	*/
	@TableLogic
	@TableField
    @Schema(description = "删除标识", hidden = true)
    private Boolean delFlag;
}
